package api

import (
	"github.com/gogf/gf/net/ghttp"
	"shrimp-blog-server/app/model"
)

func (*apiLink) Get(request *ghttp.Request) {
	labelService.GetLabel(request, getQueryParamID(request)...)

}

func (*apiLink) Post(request *ghttp.Request) {
	var links []model.Link
	_ = request.Parse(&links)
	linkService.AddLink(request, links...)
}

func (*apiLink) Put(request *ghttp.Request) {
	var links []model.Link
	_ = request.Parse(&links)
	linkService.UpdateLink(request, links...)

}

func (*apiLink) Delete(request *ghttp.Request) {
	linkService.DeleteLink(request, getQueryParamID(request)...)
}
